﻿using AutoMapper;
using Zhaoxi.TakeaWay.Model;
using Zhaoxi.TakeaWay.ModelsDto;

namespace Zhaoxi.TakeaWay.App.Utility
{
    /// <summary>
    /// 这里就是配置实体和Dto之间的转换规则
    /// </summary>
    public class AutoMapConfig: Profile
    {
        /// <summary>
        /// Richard老师有专门录制的视频  可以找助教小姐姐去领取
        /// </summary>
        public AutoMapConfig()
        {
            base.CreateMap<Category, CategoryDTO>();
            base.CreateMap<Product, ProductDTO>();
            base.CreateMap<RotationChart, RotationChartDTO>();
        }
    }
}
